package io.gitee.kotle.base.library

import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.viewbinding.ViewBinding
import io.gitee.kotle.android.mvvm.binding.IMvvmBinding
import io.gitee.kotle.android.mvvm.binding.MvvmBindingImpl
import io.gitee.kotle.android.mvvm.mvvminterface.MvvmViewType

/**
 *
 * 描述：
 *
 * 创建人：jiale.wei
 * 创建时间：2021/11/23 11:24 上午
 *
 */
abstract class BaseBindingActivity<Binding : ViewBinding> : BaseActivity(),
    IMvvmBinding<Binding> by MvvmBindingImpl() {

    override fun onMvvmCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): MvvmViewType {
        return MvvmViewType.ViewBindingType(
            onCreateViewBinding(this, inflater, container)
        )
    }
}